home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6643 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.1 KB

  1. Path: phoenix.nlci.com!news
  2. From: krauskop@pop.nlci.com (Curtis Krauskopf)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Heap Agent / SmartHeap
  5. Date: 12 Feb 1996 12:15:05 GMT
  6. Organization: NetLink Communications, Inc.
  7. Message-ID: <4fnb09$ipj@phoenix.nlci.com>
  8. References: <4f0uov$1au@maureen.teleport.com>
  9. NNTP-Posting-Host: dialup1-25.nlci.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-Newsreader: WinVN 0.99.6
  13.  
  14. In article <4f0uov$1au@maureen.teleport.com>, grossman@teleport.com says...
  15. >
  16. >I am looking for comments about MicroQuill's HeapAgent
  17. >and SmartAgent from those who have use them.
  18. >
  19.  
  20. Jeff,
  21.  
  22. I use both products on a regular basis.  Specifically, I have the Dos 
  23. Smartheap and the Windows HeapAgent.
  24.  
  25. I find both products to be incredibly invaluable tools when I am doing 
  26. development and testing.  Using HeapAgent and SmartHeap is like having a 'big 
  27. brother' watch over your shoulder, making sure that you aren't doing something 
  28. stupid to your heap.  For the most part, the tools are unobtrusive and do all 
  29. of their testing in the background.  You only really notice them when 
  30. something goes wrong with the heap.
  31.  
  32. One Real Life example I had, just last week, was in using a third-party 
  33. library with a Borland C++ 4.52 compiler.  For some reason, the program 'hung' 
  34. when compiled for Dos, but worked okay when compiled for 'EasyWin' windows.  
  35. Well, I just linked in Smartheap, made NO changes to the source, and reran in 
  36. Dos.  Bingo!  Smartheap reports that I'm running out of memory.  Okay, add 
  37. three lines of code to the main() routine, recompile, and the error log shows 
  38. that I have a memory leak in one of the third-party objects.  Add one line of 
  39. code (a #include) to the library, recompile THAT, and I'm told the exact line 
  40. where the memory leak is occurring.  In twenty minutes, I had a problem solved 
  41. that could have taken me a week to figure out otherwise.
  42.  
  43. Strangely enough, the problem was with the compiler and not the library.  The 
  44. destructor for an object was not being called, which was not releasing the 
  45. memory allocated by that object.  This was happening hundreds of thousands of 
  46. times internally in the library, and so it eventually consumed all memory.
  47.  
  48. The MicroQuill tech support is the best in the business.  They are very 
  49. helpful, and do not give pat answers like "well, it could be your code...".  
  50.  
  51. According to MicroQuill, the amount of QC testing they do on their SmartHeap 
  52. product is enourmous.  Their test suite takes two to three days to complete.  
  53. If it finds a bug, they retest it from scratch.  That gives me a lot of 
  54. confidence that I can trust it to do the right thing with my programs.
  55.  
  56. When I got HeapAgent, I found a bug in their realloc() routine.  It should 
  57. have filled a released section of memory with a sentinal value (0xDD), but it 
  58. was filling that section with garbage.  A quick message to MicroQuill on the 
  59. CompuServe forum confirmed that it was a bug, and since the HeapAgent API is 
  60. provided, I could code my own bug fix, which I did.
  61.  
  62. Overall, I'm very impressed with their product, and very happy with the 
  63. service provided by MicroQuill on CompuServe.  
  64.  
  65. Curtis
  66.  
  67.